Database class, added to media server / client

Added a Database class with some initial table schemas and hooked up the
media server to a few of the Database methods. Added some more
handshaking between client and server and hooked up image upload in the
local filesystem as a test.