Refactor controllers and helpers

move db actions to models package
refactor helpers
better controller composition
start posts controller
so this is a bit confusing at first, has to do with what I was talking about with passing pointers to functions. 

In this case, we want to know whether or not `DB.Save` succeeded or failed. However, we don't assign `err` to the return value of `DB.Save` itself, because pretty much all Gorm actions return a pointer to the `DB` object, not the model you just acted upon. This is useful for chaining queries together and other funs things like that. 

Instead, the latest errors are kept in this Error attribute on the DB and so we check that to know whether the last action worked. The `i` that was passed in is a pointer, so model that was passed in to the function has been mutated everywhere it's pointed to and we don't need to return it.