Add support to express 4.x and fix a bug

1. Add support to express 4.x
2. Fix a bug which can cause bitbucket post hook to be triggered multiple times.
I move the response here because of this issue. https://bitbucket.org/site/master/issue/4512/strange-behaviour-of-the-post-service-bb
The bitbucket post service retries the request after 20 seconds if it hasn't received the HTTP 1.1 200 return code. So if the 'git pull' command takes more than 20 seconds to execute, the post service will retry and we will receive another post request, that's not expected. So move the response here will solve this.