Added validation of enums

Fixes #142 

Added validate() to EntityMetadata and call it at end of constructor.
Made EntityMetadata final as well.

Note: looked at validation that's done in crud and it's not appropriate for reuse.  Validation there is checking data coming in on some crud operation.