Move reading of cf-consumer.pid to def.cf and guard it by enterprise and hub classes.
Move reading of cf-consumer.pid to def.cf and guard it by enterprise and hub classes.

Redmine: 6303

This is necessary because class guards do not protect function evaluation when calling methods.

eg.

bundle1
  methods:
  class1::
   usebundle => bundle2;

bundle2
  methods:
  # class1 needs to be used here as well
  # Otherwise cf-promises will try to read the file
  # In our case, this file doesn't exist in client nodes
  class1::
    "data" string => readfile(...);

phnakarin/masterfiles,maciejmrowiec/masterfiles,frap/masterfiles-1,martingehrke/masterfiles,frap/masterfiles-1,martingehrke/masterfiles,maciejmrowiec/masterfiles,phnakarin/masterfiles,maciejmrowiec/masterfiles,frap/masterfiles-1,martingehrke/masterfiles,phnakarin/masterfiles