CP-8679: fake makedirs and file, add errorcodes

Enhance the testing library by faking out os.makedirs and file. This
will enable to test further components, which try to use these
functions.

Also create a setup_error_codes method that will pretend that the error
codes file required by XenError are there.

Also increase the existing testlib's coverage to 100%.

Signed-off-by: Mate Lakat <mate.lakat@citrix.com>
(cherry picked from commit 0c91e384e5de298508daeef29e3e2fc9a8bbbf83)
Fix XenError

If the XML error description does not exist in the filesystem, XenError
tried to call Exception.__init__(self, ''), which is invalid, as self is
not inheriting from Exception.

Github: fixes xapi-project/sm#158

Signed-off-by: Mate Lakat <mate.lakat@citrix.com>
(cherry picked from commit cb1e0df497c24e6e31929b69353cada6bf0e0538)
CP-8629: Do not build snapwatchd for unit testing

It is no longer required to compile snapwatchd and put the bindings on
the pythonpath, so removing it.

Signed-off-by: Mate Lakat <mate.lakat@citrix.com>
(cherry picked from commit 310776c5bb196f46abeb4f03b15997b3be4c348a)
Testlib enhancements

GitHub: closes #172 on xapi-project/sm