Improve extern; update test apps

Generate 'extern' assembly directives for NASM for symbols that are
used/referenced but not defined within the same file.