support static build

This change backport the static build from rcouch.

A static build of spidermonkey is the default. To build with the
libraries installed you can pass the parameter `libs=shared` to the
make.

By default couch_collate is using ICU installed on the system except if
you pass the option `icu=static` to the Make.

At anytime you can override the compilation environnement with the
following variables:

JS_CFLAGS
JS_LIBS
ICU_CFLAGS
ICU_LDFLAGS
130 files changed