BUG: #2503 Fixes performReadonlyTransformation for OptionSetField

NEW: Adding unit test for performReadonlyTransformation #nd fixing OptionSetField #2503

BUG: Fixing undefined variables and function parameters for PerformReadonlyTransformation unit tests

NEW: Adding unit test to OptionsetField for read only fields
Merge pull request #2718 from silverstripe-rebelalliance/2503

BUG: Fixes performReadonlyTransformation for OptionSetField

Closes #2503