Add lock mode for DoctrineORM and DoctrineODM

Add lock_mode option for DoctrineORM and DoctrineODM
additional fixes:
Add enquote filter
Shorten entity_manager code useing enquote filter