Added Error class
Switched to STATIC lib

At the moment it's not a proper .so object anyway, just shared code
between unit tests and main application.
To be used a shared lib it would require making a real interface to it.