ESSENTIALS-445: Extract plugin installation state machine.