flatten and flatten! methods for ActiveSupport::Duration

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