msm: vidc: Adds error check for controls

- Adds Error check before calling control to make
sure that Venus is in right state.
- Adds supports to calculate right scratch buffer length.

Change-Id: I83043a87859d7bb31c683e3ad19a4a23fb519747
Signed-off-by: Praneeth Paladugu <ppaladug@codeaurora.org>