Fix signal handlers being inherited by child processes

This fix is similar to
02acdac479ba8ee0fb85682910aa869d284ce3ef.
Fix signals not being received in b_main

SIG_IGN isn't enough; we need to set a signal handler in
order for pselect to return EINTR.  Set it to an empty
function.
Statically compile sqlite3 in ex1

Remove the BUILDING_ON_STRAGERS_MACHINE and use the
sqlite3.h and sqlite3.c in vendor/.
Fix running ex1 on Linux

Some macros need to be defined to make glibc happy.  See
CMakeLists.txt for details.

sqlite3 needs -ldl.