minor refactoring

Signed-off-by: Sergey Krivohatskiy <s.krivohatskiy@gmail.com>
Refactoring. TableBase changed from Iterable<BufferView> to Iterable<ViewWithId>

Signed-off-by: Sergey Krivohatskiy <s.krivohatskiy@gmail.com>
Major refactoring. All queries logic moved into DB

WhereCursor and table rewritten to use Record(additionaly stores record
id to support delete operation and other DB functionality)

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