Support encoding Structs nested inside Arrays and Slices.
Merge pull request #7 from tomharris/encode_arrays

Support encoding Structs nested inside Arrays and Slices