San Francisco to help clear marijuana citations using algorithm