NEW Provide a consistent way of triggering flush

Provides an interface for classes to implement their own flush()
functionality. This function gets called early in a request on
all implementations of Flushable when flush=1|all is requested in the
URL
    
This fix came out of an issue where Requirements combined files were not
being cleaned up after dev/build?flush=1, due to the fact that flush
would only occur when you called it while on a page that used those
combined files, but not in any other contexts. This will now call flush
on any implementors of Flushable regardless of the context of where
flush was called.

I've simply set a flush variable in some cases like `Image` and `RestfulService`
so it works the same as before for those. Currently those classes don't have
any way of clearing all caches yet in one go (e.g. like SSViewer::flush_template_cache()), but if you
think we should do that, I'll get onto it :) `RestfulService` is especially annoying
in that it doesn't use `SS_Cache` for it's caching.

In the case of `SSViewer::__construct()` doing a `Security::permissionFailure()`
if flush was requested but you don't have permission, I don't think that's needed
anymore. I tried putting the site in test mode and trying to flush, it still asks
to login even without the security check done there.

Wasn't sure whether we should do this for a 3.1 or 3.2 release, let me know what
you think.

Hmm. This could maybe be changed to the equivalent of `unlink(glob(TEMP_FOLDER . "/xmlresponse_*"))` - changes flush to mean "flush the whole cache, not just this specific response" though, and won't work if getCachePath is overridden. Shame there's no way to work like that if it is. Stupid hand-rolled caching solutions.