Fix device capability checking in v4l2 input.

The capabilities flags that were used previously describe all
capabilities the physical device offers. This would cause devices
that are accessible through multiple device nodes to show up with
all device nodes while only one of the nodes might actually offer
the needed video capture capability.

If the device has more nodes the CAP_DEVICES_CAP flag might be set
in which case the device_caps field is filled with the capabilities
that only apply to that specific node that is opened.
Do not explicitly set a default device in v4l2 input.

This was added at a time where the source properties dialog did not
pop up automatically on source creation. Now when the properties are
displayed the first device in the select input will be selected by
default if there was none already specified by the source settings.

This will make the code cleaner and also save one redundant round of
device enumeration.
Use helper function to set input in v4l2 input.

This adds an additional option to the input select to leave the input
unchanged when starting the capture, which is also the new default value.

Additionally a helper function was added to set/get the input.
Use helper function to set format in v4l2 input.

This adds an additional option to the pixelformat and resolution select
to leave the settings unchanged when starting the capture, which is also
the new default.

Additionally a helper function was added to set/get the format.

Since the helper function also needs to pack/unpack the resolution, the
pack/unpack functions were moved to the helper library and prefixed with
v4l2_ in order to avoid possible collisions.
Use helper function to set framerate in v4l2 input.

This adds an additional option to the framerate select to leave the framerate
unchanged when starting the capture, which is also the new default value.

Additionally a helper function was added to set/get the framerate.