Revert "Revert "MB-8415 change engine...""

This reverts commit a165d1c10cf0071571cd3787a0b7c5a5cae3f391.

This returns original commit which was just reverted in order to let
ep-engine folks review their corresponding change.

Change-Id: Ied466f51f2ee648c350e1b2b490bbe78576f624b
Reviewed-on: http://review.couchbase.org/26787
Reviewed-by: Jin Lim <jin@couchbase.com>
Tested-by: Jin Lim <jin@couchbase.com>