refactor AudioRecord and AudioFlinger openRecord()

Refactor the mechanism used by audio record tracks to query and
attach to an input mixer/stream in audio flinger. This will:
 - reduce the number of binder transactions needed to create a record track
 - move sample rate, framecount and flags validations to audio server side
 - move audio session allocation to audio server side
 - prepare restriction of certain binder transactions to audioserver only

Also:
 - renamed openRecord() to createRecord() for consistency with AudioTrack
 - make AudioRecord mStatus update consistent when calling default
 contructor + set() or constructor with arguments
 - make AudioClient, CreateTrackXXX and  CreateRecordXXX classes derive
 from Parcelable
 - restore audio session ID validity check in AudioFlinger::createTrack()

Test: CTS tests: AudioRecordTest, AudioRecordingConfigurationTest, AudioPreProcessingTest
Test: manual test for capture use cases: camcorder, OK Google, VoIP calls
Change-Id: I72edaa7ddef1da11c77df21e88378e3aa9012d58
12 files changed