Efficient Exact Inference in Planar Ising Models