controllers: make process_machines more profilable

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

Signed-off-by: Mloc-Hibernia <colmohici@gmail.com>
Merge pull request #4862 from Mloc/bs12-mprf

controllers: make process_machines more profilable