[corlib] Marshal: fine-tune the pointer Read/Write operations.

This patch reworks the Marshal's Read and Write pointer operations
to avoid performing a modulo operation to choose the fast path, as
in some platforms the modulo operation is implemented as a C subroutine.

Instead we use bit operations which always run in constant time.

It also avoids the IntPtr.XXX method calls, factors out "unsafe", only
ever performs one IntPtr->pointer conversion, and makes the source
code uniform.