Add a marshal_at function which takes a pre-allocated buffer

Signed-off-by: David Scott <dave.scott@eu.citrix.com>