porting jpeg_mem_src() from jpeg lib v8c

A new function jpeg_mem_src() is ported from jpeg lib v8c to
support decode/encode in memory.  The source code is coming from
merged of Change-Id: I4d7f81fbb9a9e0cecaadd1855fc9f34296ba3eae
http://www.ijg.org/files/jpegsrc.v8c.tar.gz

Change-Id: Ibbc86ae6d5d041b7018b640395f8c7399de76acb
Port jpeg_mem_dest for in-memory operations

 * Dependency for vendor code

Change-Id: I635e0d53b2bfd884aea1faee81146da633bb56e9
Merge remote-tracking branch 'cm/cm-12.0' into lp5.0