Retry on some 5xx errors

`composer install` gives me some intermittent 502 errors on github. Composer already does some retries. I think, on 502, 503 and 504, we should retry.