MDL-45048 repository_wikimedia: Abusing usage of optional_param

The optional_param call was moved outside of the constructor
because it was called every time the repository would be initialised.
That was leading to problems when the parameter was defined from
another form and not complying with its expected type.