Cursor factory

This allow us to override the ```getCursorFactory()``` method in our own implementation and use a custom CursorFactory like Cerberus [1]

[1] Cerberus - https://github.com/chalup/cerberus
throw an illegal state exception and explain why, for faster feedback for the user