rewrite of unitOpensDoor() function.

the previous incantation was a wretched nest of if statements, questionable
logic, was difficult to follow, didn't work properly under a range of
circumstances, was inefficent, and was filled with "scotch tape" from being
"fixed" too many times.

a complete rewrite was therefore in order.
this should be more robust, easier to follow, function properly under most
if not every circumstance, is efficient, clean and has that new car smell.