Handle spaces in hwid

In Sailfish SDK emulator image, 'ssu model -s' prints:

SDK Emulator Wayland

This patch handles spaces in resulting core image filename.
Disable core reducing beforehand if core_exe has zero length

Refactoring in preparation for stack trace generation.
Allow generating of stack traces on a device
Check for missing gdb and try to install
Honor user configuration of rich-core-dumper

The script was using solely the system configuration, ignoring any user
modifications done e.g. via a settings applet.
Log non-zero gdb exit status into crash report

Quite often gdb can be e.g. terminated by oom killer, especially when
several child processes crash along with its parent.
Merge pull request #2 from xhaakon/stack-trace

Feature: on-device stack traces
Add list of shared libraries and build-ids into rich core
Try to load symbols for libs without build-id into gdb before making a stack trace
Fix gdb detection

Seems rich-core-dumper is invoked with PATH not exported to be seen
by subshells, so 'which' couldn't find 'gdb'.

Also discard zypper output that would be otherwise appended to the
core image.
Merge pull request #4 from xhaakon/stack-trace

[core] Add list of shared libraries and build-ids into rich core
Remove IMEI from core file name
Add 'ssu-status' section into rich core
Merge pull request #5 from xhaakon/ssu-status

Ssu status
Include list of package repositories into rich core
Merge pull request #6 from xhaakon/master

Include list of package repositories into rich core
Make auto-download of debug symbols optional
Merge pull request #7 from xhaakon/optional-debuginfo

Make auto-download of debug symbols optional
Include crashed binary's rpm package name into rich core
Merge pull request #8 from xhaakon/include-exec-package

Include crashed binary's rpm package name into rich core