Minor improvements to device type detection

Check for tablets first to avoid all Android devices being identified as
"Mobile devices" and add specific UA check to detect Galaxy Tabs/Notes.