hds: avoid NULL dereference and use-after-free

(cid #1251048 and #1251059)
contrib/vpx: fix compilation for iOS
extras/ios: rework LDFLAGS handling and enable vpx for the scary build flavor
contrib/avcodec: pass extra CFLAGS as LDFLAGS on iOS to have the needed flags
mosaic: use after free
chromecast: double lock
dca: force gnu89 C standard

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
atmo: fix invalid delete
caopengllayer: use visible rect instead of layer bounds to determine the current output size