Hastily implemented persistent deque.
push/pop Front/Back functions (some errors exist)