Fix compilation warnings adding stricter flags

-std=c89 -pdeantic -Wextra -Werror -Wno-long-long
-Wno-missing-field-initializers

Also, fix some compiler warnings under windows. There's still a LNK4197
warning which is yet to be resolved

Change-Id: Ia9e139b0cbce107c0ea9c49008b8b77f5fca8577
Reviewed-on: http://review.couchbase.org/26349
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Mordechai Nunberg <mnunberg@haskalah.org>