Nonlinear quantum optics mediated by Rydberg interactions