RCore.cmd_search refactoring

* use a search_parameters structure
* extract functions to increase readibility
* remove non existent config option