Deque Languages, Automata and Planar Graphs