frameworks/av : Fix for NULL pointer deference when Audio Record fails

-- mRecord will be NULL when the AudioSource start fails due to wrong
value from getMinFrameCount.
-- In the destructor mRecord is accesed without any condition check
which results in crash.
-- Added check  to see if mRecord is not NULL before deleting it.

CRs-Fixed: 426561
(cherry picked from commit 781ef4e60c5e1477f1e79b61855d95263cea0725)

Change-Id: If4785136f77eeb071619388b6325546853ab0d00
libstagefright:Buffer size needs to be set on Native Window

In SoftwareRenderer constructor, setting of buffer size was missing, due to
this buffer size of the previous instance was being used by native window.

CRs-Fixed: 420228
(cherry picked from commit b1a38f329a4f973562241f8b8f80c622b654d919)

Change-Id: I1ec05a6ebe2552132251824523731eaaca4f09bf