Audio: add an openOutputStreamWithFlags API

The existing openOutputStream API did not allow passing stream flags even
though its audio hardware interface's open_output_stream counterpart does take
a "flags" argument.  This means that, when the audio hw_module is implemented
using libhardware_legacy, the output flag was lost.

This commit adds an API in libhardware_legacy's audio module, allowing to pass
the flag, and updates the default wrapper in order to call this new API instead
of the old version that missed the flag.

Change-Id: I20c102d32b489f87fabbd7d02aa0b28fae13948b
Signed-off-by: David Wagner <david.wagner@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Merge "Audio: add an openOutputStreamWithFlags API"
auto-merger: merge in from aosp/master

Conflicts:
	audio/audio_hw_hal.cpp