API Prevent DDOS by checking for env and admin on ?flush=1 (#1692) - 3.0

3.0 version. See https://github.com/silverstripe/silverstripe-framework/issues/1692

CAUTION: Needs to be squashed before merge, leaving unmerged changes in order to illustrate progress and make peer review easier.