translate: Move freeing of frame to after it is used.

When translating from one format to another it is possible
to inform the translation function that the source frame should
be freed. This was previously done immediately but shortly
afterwards the frame that was freed was accessed and used again.

This change moves code around a bit so that the frame is now
freed after it has been completely used.

(closes issue ASTERISK-22788)
Reported by: Corey Farrell
Patches:
	translate-access-after-free-11up.patch uploaded by coreyfarrell (license 5909)
	translate-access-after-free-1.8.patch uploaded by coreyfarrell (license 5909)


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/1.8@403014 f38db490-d61c-443f-a65b-d21fe96a405b