DataBase class moved out of DBEngine

Signed-off-by: Sergey Krivohatskiy <s.krivohatskiy@gmail.com>
BufferManager rewritten to use ByteBuffer

Signed-off-by: Sergey Krivohatskiy <s.krivohatskiy@gmail.com>