MB-100 Preserve stack trace when reraising an error.

Change-Id: I68c101b242f90d2d206b56e2dfc97f8d7f30bdc3
Reviewed-on: http://review.couchbase.org/29068
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>