Neural State Machine for 2D and 3D Visual Question Answering