Refs #4997 - Javascript action token refresh is done every half of token...

... lifetime (1h default), not every minute.

Rebased version of https://github.com/Elgg/Elgg/pull/5218