It's a common task to duplicate some memory. Add (x)memdup functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>