Registration workflow fixes

Added ability to change mandatoriness of the registration attributes in
initRegistrationScript

Added explicit checks when creating RegistrationConfiguratio object.