[balooctl] Refactor the "index" and "clear" code
balooctl main holds rather low level code that performs the "index" and "clear" functionality. This code would be better in separate files, following the established pattern. This would also allow future development of the functions.
There is deliberately no change in functionality.
Edited by Archaeopteryx Lithographica