Add a helper for enum behaviors.
Add a helper for enum behaviors.

Rather then adding checking the syntax in multiple places, provide
a helper so the other code is easier to follow.

allevato/swift-protobuf,apple/swift-protobuf,thomasvl/swift-protobuf,allevato/swift-protobuf,cburrows/swift-protobuf,tbkka/swift-protobuf,cburrows/swift-protobuf,tbkka/swift-protobuf,cburrows/swift-protobuf,apple/swift-protobuf,cburrows/swift-protobuf,thomasvl/swift-protobuf,thomasvl/swift-protobuf,thomasvl/swift-protobuf,thomasvl/swift-protobuf,apple/swift-protobuf,tbkka/swift-protobuf,cburrows/swift-protobuf,allevato/swift-protobuf,allevato/swift-protobuf,apple/swift-protobuf,apple/swift-protobuf,allevato/swift-protobuf,tbkka/swift-protobuf,allevato/swift-protobuf,cburrows/swift-protobuf,thomasvl/swift-protobuf,tbkka/swift-protobuf,thomasvl/swift-protobuf,cburrows/swift-protobuf,tbkka/swift-protobuf,allevato/swift-protobuf,tbkka/swift-protobuf,apple/swift-protobuf,apple/swift-protobuf