cleaner init
return first seen value instead of last

this is more consistent with the behavior of __iter__ where the first
seen header key is returned
add tests for the structure
make __iter__ more in line with dict, yields keys
add iteritems method and associated tests
refactor how structure is used