Fixed _error_checker in rest client

Restclient's method '_error_checker' for response codes 500 and 501 gets key
error exception when 'resp_body' is a string and passes conditions for
containing of keys.
Also added fix to rarely raised Exceptions after separation main and base
exceptions for two modules.

Closes-Bug: #1280767
Closes-Bug: #1289190
Partially-implements: bp unit-tests
Change-Id: I4b909d008940f8a96efc922daac64a086819c78a
3 files changed