Port jpeg_mem_dest for in-memory operations

Summary:
 * Dependency for vendor code
 * Needed for N1
Change-Id: I635e0d53b2bfd884aea1faee81146da633bb56e9

Test Plan: Compile and test it works.

Reviewers: synergy, jriordan001, raymanfx, donald.munn, rlasalle15, randall.rushing, anders3408

Reviewed By: synergy

CC: synergy

Differential Revision: http://review.codefirex.com/D311