input/source:

Added `optimize_source_model` function.
bin/openquake:

Added `--optimize-source-model` option.
tests/input/source_test:

Added a test to exercise `optimize_source_model`.