Apply Rails security patch and remove remaining RuboCop TODOs

The `rescue` here is required, because `Time.zone.parse config[...]` would throw an exception if there are no old replications, and the `nil` is intentional for new records...