Restore and deprecate img_fmt
Deprecate img_fmt type and constants removed in
6cd4a10 allowing older
code to build.
Addresses: http://code.google.com/p/webm/issues/detail?id=25
Change-Id: I786bff1ebde4d1621c6f58dcc685f382bb733e29
Fixed incorrect casts that broke rate control in some situations.