Separate cursors operations from ordinary operations and remove migration for LMDB

I went through all cursor usage in cfengine and separated direct DB operations from pure cursor operations.
The aim is to distinguish read-only cursors from write cursors.

Corresponding enterprise pull request --> https://github.com/cfengine/enterprise/pull/177

Also removed DB migration support for LMDB.