Mocked NodeManager can load and mock real drivers.

Allow get_mocked_node_manager to take parameters to specify
which drivers it should load and return, so that real drivers
can be mocked too.

Change-Id: I68a4b81d2156adada7caa5be91083aae11e6d758
Add TaskManager tests and fix decorator.

Fix the require_exclusive_lock decorator so it works on both
functions and class methods.

Add unit tests for TaskManager and require_exclusive_lock().

Change-Id: I5b86b365cce1ceb2d4926634ebcb0b412740c37d