check if ld supports --no-defined

Closes #144.
use shared libcommon.la in src/tools
build sqlite3 related targets inside thirdparty/sqlite-amalgamation

Close #114.