Re-add "wmflib: add to_milliseconds() / to_seconds()" w/fix

This time without named capture groups, which are a Ruby 1.9 thing.
This reverts commit 99bc8f73105e2a6f45939cc3ad7eb8360c63835f.

Change-Id: I37a97a7feba21964d5700d79df7d98b1d416124c