Fix typo.

- Obvious typo. This g_bitdepth - 8 used to be g_bitincrement. Doesn't affect
  anything yet as we don't actually support bitdepth > 8 yet.
Resolve unsigned/signed mismatch warnings.

- Working towards issue #11.
Remove unreferenced parameters.

- Working towards issue #11.
Resolve warnings about assignments within conditions.

- Working towards issue #11.
Resolve possible uninitialized variable warnings.

- Working towards issue #11.

- Neither variable was actually used as uninitialized.
Resolve constant conditional expression warning.

- Working towards issue #11.

- I felt that the macro was a little bit too clever in hiding the if-else
  statements so I removed that aspect, which also has the minor benefit of not
  requiring the starting if (0) statement.
Disable warnings for extras/getopt.

- This isn't our code so we don't care about these warnings.
Enable -Wall by default.
Enable /W4 for VS.

- Disabled errors are:
 - Implicit conversion from bigger to a smaller type. I don't want to disable
   it but there are still about 60 of these and adding explicit C casts
   everywhere is just going to cause more problems.
 - Nonstandard extension: Non-constant aggregate initializer.
 - Translation unit is empty.
Implemented RDO function to calculate bits used for coefficient coding
Use RDO to check for transform skip mode
Use RDO in final_cost
Fix for get_coeff_cost() scan mode selection

Small BD-rate improvement with this fix
Add a function to free g_exp_table.

Even though g_exp_table has to be global (used in #define), it's better to avoid requiring other module to directly access it.
init_context directly has a QP parameter, instead of passing an encoder_control*

This makes context less tightly coupled with encoder.
Remove cabac global variable
Moved context information inside cabac_data.

This is required in order to be able to work on parallelism.