Homotopy algebras and the geometry of PDEs