jpeg2000parse: fix several bugs and refactor
- add unit test
- should fail negotiation if sink is JPC and src is J2C, as parser can't add j2k box header
- always parse J2K box from frame
- simplify logic
- cache some state in parser for J2C sink and JPC src caps, as the parser may not have access to this info once we skip the J2K box
- update src caps if codec format changes
- fix typos in media format
fixes #1031 (closed), #802 (closed)
Edited by Aaron Boxer