state: move adapt_ctx out of dec/encint
Improve options handling

- Order arguments consistently in OPTSTRING, OPTIONS and usage string.
- Remove unused arguments
- encoder_example.c: document -h switch, replace 'h:' by 'h' in
  OPTSTRING since -h does not take an argument.
Add runtime configuration of motion compensation search parameters
examples: fix coding style
encoder: avoid malloc per frame