High-energy Emission from Nonrelativistic Radiative Shocks: Application to Gamma-Ray Novae