Revert "remove bulk."

This reverts commit 301ff841e1118b92371a3f0a1dd7a90770bb5c7c.
trap signals to assure bulk documents are posted on couchdb.
add dependency on pcntl extension.