libstagefright: use hw codec only for thumbnail mode

     - Makes sure StagefrightMetadataRetriever use hw only codecs
       for thumbnail mode.
     - In cases where hw codec fails and exits without fully starting
       SFMetadataRetriever may allocate sw codecs further down the
       list
     - Attempting to start thumbnail mode for SW codecs will result
       in assertion fail

Change-Id: I6190d8c3190703ead44d20f4a988110fdb549ec7
(cherry picked from commit 798e5085870ed79764324fb9b22b0b1cfeeead7e)