Major refactor

* Added lib/repl.h to export _one_ function
* Moved includes to the .cc file they are needed for
* Removed not needed includes
* Removed a lot of ldb:: prefixing, ldb:: namespace is only needed for exported functions
* Made a lot of functions static

I should be done now and can start hacking on new functionality.