Early phatdb functionality with tests

To run phatdb tests, simply go into the directory and run `go tests`.
The RPC wrapper is still to come, plus extended functionality.
All code formatted using `gofmt`.