Moved gatt shutdown into onDetach

Please review @schilit 
Thanks