Major database updates

Changed namespace from 'Data' to 'Database', implemented prepared
statements and query parameters, and added $unbuffered option for query
methods.
Cleaner enums
Rewrote log system

Now uses JSON to store log data.
Saved FileStore as cache implementation