Work around localhost exception issues in addUser helper

JAVA-1528
Fully remove unused DB reference in DBObjectCodec
Ported Add getLimit() and getBatchSize() to DBCursor

JAVA-1530