[WFLY-572] : "Cast" model nodes in AttributeDefinition validateOperation()

Convert the attribute in operation to the expected ModelType when it is possible.
Jira: https://issues.jboss.org/browse/WFLY-572
I think this method should return ModelNode, the 'result' param can be dropped, and this method can just return 'node'. The else block can create a new ModelNode for result.

This method will get called over 1K times during boot so we want it to be as low cost as possible. The 'if' case should be the common case so it should be optimized.