Learned Graph Rewriting with Equality Saturation: A New Paradigm in Relational Query Rewrite and Beyond