Quench action and large deviations: Work statistics in the one-dimensional Bose gas.