E0d/handle 301s

@jarv @davestgermain This PR refactors status_code handling to be more defensive and explicitly lumps 301 with 302 for xqueue because of https://openedx.atlassian.net/browse/LMS-11150
minor quibble:
`r.status_code in (301, 302)`