avfvideosrc: sort caps with the highest resolution first

When started without any caps filter we prefer the highest
supported resolution.
avfvideosrc: fix compilation with gcc

The synthesize block needs to be moved to fix a compiler error
avfvideosrc: add more debug
avfvideosrc: include config.h
avfvideosrc: fix checks for HAVE_IOS
avfvideosrc: fix build with older SDK not supporting AVDeviceFormat

AVDeviceFormat and AVFrameRateRange are available in iOS since 7.0
so we need a more dynamic approach to support compilation with older
SDK's. We use a NSObject to avoid referencing those types and key-value
coding or preformSelector to access properties.
avfvideosrc: fix build in iOS with isEqualTo doesn't exists
avfvideosrc: fix compiler warning in iOS