RID validation and Errors instead of strings

I've added the `^` and `$` special operators to the RID regexp, because currently, if `##1:1` was specified as the RID, an invalid error was thrown:
`AssertionError: value larger than maximum allowed value`.

After this change, more meaningful error will be returned:
`The RID must be a string having the format: #<cluster id>:<cluster position>`.

I've also changed all string errors passed to callbacks to instances of `Error`.