Use a handwritten offsetof macro

clang complains about our usage of offsetof(). What we do is not
strictly c++98 compliant, but compliant with c++11. So replace
the default offsetof with a handwritten macro to shut up clang
until we can switch to c++11 mode for all compilers.

Change-Id: Id724adb323ba9724ad5d7d9e0dba5a73b51af24f
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>