build: add --enable-shared and --enable-static

Add configure switches for building a shared or static library.

The switches are mutually exclusive for now; building both a shared and
a static library at the same time requires a fair amount of overhaul.

Caveat emptor: the static library (libnode.a) builds but is not useful
yet, it doesn't find built-in modules like contextify at run-time.

The prime suspect is commit 76b9846 ("node: register modules from DSO
constructors"); it looks like the constructors aren't linked into the
final binary.

R=@indutny