preparatory work in r15770: splitting code into more re-usable methods

RGB upload supported added in r15778: the CUDA kernel step is now optional, RGB mode uploads straight to the encoder's input buffer (confusingly called CUDA output buffer.. since this is normally the output of the CUDA kernel)

We also gained:

more fine-grained attributes: the "YUV444" and "lossless" flags are now per-codec. (ie: we don't disable them globally for "H264" if "HEVC" doesn't support it - and vice versa)

ability to turn off some input formats using env vars: XPRA_NVENC_NATIVE_RGB=0, XPRA_NVENC_YUV420P=0 and XPRA_NVENC_YUV444P=0.

Tested on MS Windows only with NVFBC (#1317) because the NVENC encoder refuses to run on my Linux system: with the GTX 1070 it crashes, with other cards it errors out (and the exact same card and code work on MS Windows!)

I am keeping this ticket open because I would like to test RGB upload on Linux. (maybe try a different card, or diff the long list of API call arguments with a working example: ffmpeg or the samples provided)

Not sure how I got it to work on MS Windows in the past, but since it just refuses to work with the latest code, r16455 disables it on win32.
See ticket:1552#comment:4 for details. No big loss since we often get the buffers from NVFBC anyway (#1317) so doing the CSC via CUDA is cheap.