Broke up the code a bit and added some too

I moved a lot of code around, things like putting all of the database
accessing code into its own file and all of the JSON parsing stuff in
its own file.

I wrote the JSON parsing instance declarations and the record syntax for
the achievement and achievementUpdate datatypes. They (can) contain all
of the necessary information to update an achievement, and will also get
checked to make sure all of the information is available and valid.

I reworked all of the database access functions so that now they use
functors instead of do notation.

I laid out the structure for the checking to see if all of the different
parts of the achievement are okay for changing the achievement with.