Polyhedral homotopy and its applications to polynomial system solving