Reconciling overfishing and climate change with stock dynamics of Atlantic cod (Gadus morhua) over 500 years