MB-7656 Header write/read functions now return header position

Change-Id: Ie3da2a0a9ed4f20bade5b8c4be24aee4e11965c4
Reviewed-on: http://review.couchbase.org/28816
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>