adg: ignore undefined extents in adg_canvas_apply_margins
adg: ignore undefined extents in adg_canvas_apply_margins

Previously the extents were applied regardless of the status of the
is_defined field. Also, added parameter clean-up to avoid crashes with
NULL extents.

ntd/adg,ntd/adg