libstagefright: set frame packing from codec config

- From ACodec call to configure codec is triggered but there is no frame
  packing call
- In default configuration, clips may fail if the proper frame packing
  mode is not set
- Codec config and frame packing are currently done in two separate calls.
  Fix is to trigger frame packing from within the codec config call as
  there is no reason to call each separately

Change-Id: I0455d446cd862b5e7373e3bcb9ad4bfdf7826d18
CRs-Fixed: 648894
Fix memory leak when filtering commands in insertCommand_l()

When AudioPolicyService::AudioCommandThread::insertCommand_l filters
a command from the queue, the AudioCommand* is removed from the
vector mAudioCommands by calling mAudioCommands.removeAt(). This will
destroy the pointer and compact the vector, but not delete the
AudioCommand object.

This patch adds code to delete a filtered out AudioCommand and its
data object mParam. However, mParam was void* and deleting a void
pointer is undefined behavior according to the C++
standard. Therefore, the data classes are modified to inherit
from an abstract base class with a virtual destructor.

The deletion of non-filtered commands in
AudioPolicyService::AudioCommandThread::threadLoop() was already
correct, as each case casts mParam to the proper type before
deleting.

This also fixes AOSP issue 36370.

Change-Id: I2b63838aff3608132aa496f964a929f78c4b6267
av: QC AAC encoder supports 320KBps

Change-Id: Ic937a79cd081aa1ccde395d29c02111019454003