test: Improve discoverer tool
Improve the command line parsing by using getopt and add some new modes:
- -m will migrate an existing database
- -r will reload the migrated database
This allows the issue described in #404 (closed) to be easily reproduced without requiring a full VLC