Add API to check for auto-refresh

Having an API allows core and plugins to use it without having to worry about the exact mechanism used to detect auto-refresh.