Record the last successful upload port and use it

This records the ports last identified with a given device so that if you use it
on the same machine, it will likely work on the first port we try. This helps 
keep us from hammering on ports that aren't the device we intend to talk to and
should improve stability of both the uploader and the devices connected to it.
I'm going to channel @jh-bate here and suggest `!_.isEmpty(allports)` instead of relying on truthiness.