Fixed missing optional cases as well as creating a common trait

So I ran into a case were `readMessage` was complaining that the case class didn't extend MessageLite.Builder (the `MessageType` class being pass had extension ranges), so added a common interface to get around this. Also added a few corner cases for `optional` fields. Seems that the setters were being declared as `setType(f:Class) = copy(field = f),` rather then `copy(field = Some(f))`. This was needed since the constructor declared the field as Option.. Check out this [protobuf file](https://github.com/rethinkdb/rethinkdb/blob/next/src/rdb_protocol/ql2.proto) out