Add support for :nsec option to Time#change

This is a follow-up of https://github.com/rails/rails/pull/16765 and is based on that branch.

Closes #16392.
Tests look good. Unrelated, but it looks like we're missing tests showing that `time.nsec` is preserved when `:hour`, `:min`, or `:sec` isn't changed.