Fixes a bug in Equal()

This fixes a bug in theEqual and NotEqual functions in how it deals with
integers in private structures. Before it could panic where not it
handles the properly.

This also adds a function for checking that a returned error contains
a given string message in its Error() output.