Added hour_diff template function.

This returns the difference between any data value and its value an hour
ago.