Use raw SQL in MemberDistance calculations

Results in around a 50% decrease in
the rake application:cache:member_distances
https://github.com/openaustralia/publicwhip/issues/602
Merge pull request #619 from novemberkilo/test

Use raw SQL in MemberDistance calculations