SERVER-12770 Change stringification and casting of ErrorCodes::Error to improve round-tripping.