GStreamer Highgui backend: allow variable number of appsrcs and appsinks

Currently the GStreamer backend for VideoWriter and Capture only allow 2 appsrcs and appsinks. This patch fixes this by searching for any source/sink elements which have either 'app{src, sink}' or 'opencv{src,sink}' in their name.