The JSON objects that are created from the various core MaxScale objects share a lot of common code. Moving this into a separate files removes the redundant code.