Provide parameter for core file patterns.

FreeBSD uses processname.core as its core pattern, so allow this
to be specified via a config param. Provide the old value as a
default for legacy reasons.

Based in a patch from Christian Ullrich <chris@chrullrich.net>
Use a command file for gdb instead of the -ex option.

Ancient versions of gdb still in use don't understand -ex, so we
create a temporary command file, put the bt command in there, and
pass that to gdb via the -x option, that all versions understand.

Based on a patch from Christian Ullrich <chris@chrullrich.net>