Api versioning support

Allow all requests to (optionally) specify a particular API endpoint version. An application may want to lock to a specific API version in order to prevent API updates from causing unexpected breakages.

As part of this, I extended the testcases to cover v1 endpoints. When I tested with an old version of frontend, this flushed out a couple of minor issues:

* Tag count is returned as a string in APIv1, and as an int in APIv2
* Next/previous photo endpoint returns lists in APIv2. When I updated the python wrapper, I accidentally broke APIv1 support

These are both cases where the v1 endpoint behaviour was changed when v2 support was added. I've fixed the Python wrappers to handle both cases.