Improved txdb.py a bit, introduced ngcccbase package, added tests!

This pull request is a lot heavier than I would have liked, but everything came together at once. I would particularly like third party eyes and testing on wallet_controller.py and meat.py before merging. The tests I added for txdb are rough, but it should get the ball rolling for testing other pieces too. Additionally, adding the ngcccbase package paves the way for better organizing the project.