Encode signed global id metadata with a hash.

Based on @jeremy's message here: https://github.com/rails/globalid/pull/29#discussion_r16596489

Let's us accommodate new metadata without breaking old messages.

This change also flips some `assert_equal` calls with wrong ordered arguments.
If the verifier uses a different serializer, like YAML or Marshal, these will be Symbol keys. They happen to be Strings since we're using a JSON serializer in tests.