Move EmptyTimePeriod and EvenMinutesTimePeriod to libmethods.

Fixes #5032