Stop serialization using index.

Stopping serialization by testing if the pattern index is equal to the
pattern length instead of setting the pattern to null. When we implement
`sizeOf` we're not going to want to report the size of the write even
after the buffer has been written, so we don't want to lose the pattern.
Implemented `sizeOf` property for serializer.

The `sizeOf` property returns the exact size of the buffer necessary to
accommodate the count of bytes that will be written by the current
pattern with the current variables.

Closes #37.
Merge branch `size-of` into `master`.