gldownloadelement: fix memory leak and build warnings

* gst_pad_get_current_caps ups the refcount on returned caps, so
  caller must unref or the caps leak
* fix build warnings related to GstMemory by casting correctly

Change-Id: I113aa1bc86fe42f3c588483fea401d9c1421446f
1 file changed