WIP on introducing named collections complete with an API for management.
Cleaning up code for reuasbility and adding DB API features.
Cleaned up database code and web response handling.
Updated HTML templates
Fixed bugs with posting new images.
Unified rehome logic across API and UI. Named collections are now supersets of the default unnamed collection.
Clean up file paths.
Added /api/v2/* prefix to denote API versions; added back old /api/list endpoint for backwards compat.

Creating directories as needed.
Inlined postImage code into main requestHandler. Added support for X-Forwarded-For and X-Real-IP headers for proxying.