Extract commonality between rabbit_control_main and rabbit_plugins_main.
Extract more commonality.
Update tests
Merge bug25955