enc_qsv: general cleanup.

Mainly:

 - coding style
 - formatting
 - indentation

Also:

 - fix two warnings
 - remove unnecessary header
 - remove unused parameter in parse_nalus
enc_qsv: simplify encqsvClose.
enc_qsv: simplify qsv_enc_init.
enc_qsv: cleanup encoding loop, part 1.

Mainly:

 - allocate frame surface data in qsv_enc_init
 - setup input frame surface outside the loop
 - remove unnecessary variable
 - handle errors via a common path
Revert "enc_qsv: cleanup encoding loop, part 1."

This reverts commit 118b784761ac2194f8f03ef2bcf404d294a61f3a.
enc_qsv: cleanup encoding loop, part 1.

Mainly:

 - allocate frame surface data in qsv_enc_init
 - setup input frame surface outside the loop
 - remove unnecessary variable
 - handle errors via a common path
enc_qsv: cleanup encoding loop, part 2.

Move related code to separate functions whenever
possible; simplify or improve the code where applicable.
enc_qsv: cleanup encoding loop, part 3.

Move encoding loop to its own function and simplify encqsvWork.