Update competition_rank.py

Added the ability to use a function or lambda as your order_by
Update competition_rank.py

isinstance > type
mostly changing this to force travis to re-run tests
Changed the order of the type test because a dictionary list coming in with a function would fall into the first clause before. I also added one test, but maybe we need more because I have no idea how this is actually planned to be used and I bet @schwanksta has something more useful and interesting in mind than my stoopid simple one.
Tried upping the postgis package in the travis config to make it go on the new platform they have.
Merge branch 'pr/36'