A leaked Whitehall document has revealed how civil servants survive democratically elected changes