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