Links to the API should link to "master" if the version number ends in 'a'

Master versions are eg '2.1a' and don't have a branch in the docs yet. Instead of here:

http://docs.ckan.org/en/ckan-2.1/api.html

they should link to here:

http://docs.ckan.org/en/master/index.html