Fix vertical door tiles being unvisited

Triggers on vertical doors would reset
tile flags, including the visited flag. Fix
by moving visited out of tile flags and
into its own field.
Plus refactoring