flatten and flatten! methods for ActiveSupport::Duration

Flatten methods for Duration, as discussed in #6559 and #6581