client API: qthelper: fix bugs

Pretty dumb oversights.
DOCS/client_api_examples: qtexample: remove debugging code

Forgotten.
player: fix --frames

This could produce an extra frame, because reaching the maximum merely
signals the playloop to exit, without strictly enforcing the limit.

Fixes #1181.

CC: @mpv-player/stable