Self-supervised learning of visual appearance solves fundamental problems of optical flow