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