Use signed int to represent epoch in rlm_cache
Cast interval values to ints before use, so we don't get sign issues with time_t. Fixes #659