IntraHealth - Fixed problems with: location filter, calculations and small refactoring.

In the PR fixes for cases:
http://manage.dimagi.com/default.asp?122052#693040
http://manage.dimagi.com/default.asp?122079#693042
http://manage.dimagi.com/default.asp?122887#694623
http://manage.dimagi.com/default.asp?122986#695212
This should call the underlying view that backs `Location.filter_by_type` (`locations/by_type`)directly and rely on the reduce view to generate the count. I think it's worth adding a utility function to get the count for a given type iven that @twymer literally also just bumped into this today