Clean up api.js

* Rearrange code into alphabetical order.
* Make comments more unform.
* Other assorted cleanup.
Add addToAlbum to the API
Add addToAlbum to database.js
Bug fix in image.addToAlbum.
Single image page controls now in one place.

* Also no longer includes "add to album" if you don't have albums.
* Probably need to do better formatting.
* Probably need to use API rather than the horrible POST hack.
Fix bugs in userOwns
Add an  function.
Update single page to use new addToAlbum api.
Add error checking in albumContents page.
Merge branch 'master' of github.com:GlimmerLabs/MathOverImages

Conflicts:
	Site/functions/albumContents.js
	Site/functions/image.js