More tests!

Now that we have the SamBuilder class, we can test most of the Sam API. This pull-request includes several tests to all parts of the Sam API in a major effort towards completing #4.

Since these are all small changes, and the commit messages are self explanatory, I found it better to maintain it in separate commits.  If the reviewer prefers, I can squash it all into one and rewrite the message.

ps: I sneak fixed a memory leak in variant.cpp generic_string_info_field() in the second commit. 
I *think* that the check_throw is only checking that we are throwing, not exactly what we are throwing. It's the only explanation I can find.