alsa_sound: Fix for device switch crash

-Issue:Native crash seen while device switch during
 LPA/Tunnel playback
-RootCause: Close output is being called on direct output
 during device switch
-Fixed by removing this call

Change-Id: If3de7f8549abc718ae27641c88464676b5cb1779
CRs-Fixed: 434708
alsa_sound: Fix for MO call delay during LPA playback

-Issue: sometimes bt_sco enable is too late on MO Call during LPA playback
-RootCause: If MO call is initiated during LPA playaback on BT and dueto
 the following call sequence causes this issue.
 1. StopOutput will be called once the touchtone playback(for phone number and call) has been done
 2. StopOutput calls setOutputDevice with all active outputs. In this case due to some timing
    issue LPA output has not been closed at this point so it will call doRouting on BT device(A2DP)
    with a delay of 276 Msec which will overwrite the actual voice call routing on BT_SCO.
-Fixed this issue by setting dealy to zero device is same as previous device

CRs-Fixed: 432741

Change-Id: I6dbd7ef6830bd09331077c20d11f87e20eba4fde
alsa_sound: Fix for, "Music getting played after onpausetimeout"

- Music is getting played after onpausetimeout.
- After onpausetimeout, if there are anymore buffers with
  the driver, it gets rendered without issuing a start.
  LPA driver should not have any buffers, after AudioSessionOut is
  teardown.
- Fix this by, flushing the buffers in case of onpausetimeout.

Change-Id: I65494ab264748c3128ade25a6558a198da5be5ee
CRs-fixed: 431813
alsa_sound: Issue with seek and write

-Song repeat was heard when seeked in short steps
- If seek is issued when a write is going on, we have
to skip the buffer. Also, we have to clear the skip flag
if there is data coming back from the driver
- Check the flag set from the LPAPlayerALSA level to check
if the flag is got after seeking
- Also, make sure pause is not called only if write was called
- And that buffers have to be flushed as many times as
when seek is called. For this, a count is introduced

Change-Id: I2810f7b8c3f17f398f65c8bb57e86e4fb8445f76
Crs-Fixed: 428750