Move some time duration code to helperfuncs.

- Move IsValidDuration from m_chanhistory to helperfuncs.
- Move duration_multi to be a static variable in helperfuncs.