controllers: make process_machines more profilable

Splits process_machines() into 3 procs for its actions, trying to
figure out which is causing the lagspikes.