Dodgers sign Hamels, add depth to depleted rotation