Generalized Bayesian Inference for Scientific Simulators via Amortized Cost Estimation