Added functions to cast a maidsafe_error to and from an int.