Add implementation for identity::assert_regex unit test

Please note that the internal tests (and by extension *all* assert_regex
statements) will fail on gcc 4.7.2 until the <regex> header is properly
implemented.