[gdb] add optional gdb building

Signed-off-by: Juha Kallioinen <juha.kallioinen@jolla.com>