(WORK IN PROGRESS) Add a driver model

This change adds a driver model that can be used for lock
management, sync management, etc.. Drivers can extend the error
codes and configuration. Configuration was moved into a class and
is accessible via the global CONF. Configuration is automatically
extended when drivers are loaded. Drivers are accessed through the
CONF class.

This change also moves the default hooks, default sync and default
locking mechanism into a default 'remote' driver.