FIX: Manifest flushing

Fixes silverstripe/silverstripe-framework#2325
Fixes silverstripe/silverstripe-framework#3093

Static manifest was not being flushed during a dev/build on some environments (without ?flush in URL) and template manifest was never being flushed during a dev/build.
Merge pull request #3677 from jonom/3093-flush-bugs

FIX: Manifest flushing