First part of support for optional types

Added optional val, and encode and decode.

The decode is a bit nasty since for anything that isn't a string we want to decode "" as None. However, for string we decode it as Some("").
Ok, cool.

I was expecting there to be an `Option.some[T]: Option[T]` which would communicate that you never expected a `null` value, as opposed to `Option.apply`, which would communicate that you were deliberately putting that there to turn possible null values into `None`s. But apparently not.