endian: add specific macros for double conversion, fix bson_iter_double().
build: use ac_create_stdint_h.m4 and check for memalign.
build: check for solaris pthreads, which mess up macros.

also check for posix_memalign() and memalign().
iter: convert double before writing to buffer.