return different errors from functions returning pointers

Now functions, which return pointers return NULL in case
of error. It's not very convenient, because it's better
to provide error reason. So introduce 3 new API calls:

void *libct_err_to_handle(long err);
long libct_handle_to_err(void *handle);
int libct_handle_is_err(void *handle);

Which handle error codes in pointers.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
py: fix error handling

Fix error handling in python wrappers because of changing
In C functions return values in functions

libct_session_open
libct_session_open_local
libct_container_create
libct_container_open

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>