Rewrote logic to compute top n searches from last m days (@mdasorwala) - removed iterative code and substituted direct db query.  Also added API request parameters for last_n_days and top_n_searches.  Some Pep8 fixes as well.  Fixes #238.