Refactor user_can_access_case method

Updated this in response to https://github.com/dimagi/commcare-hq/pull/3187/files#r11678895

The diff is a little funky, but I just moved the three checks out to methods so the method is still very clean but we get short circuiting to keep it quick.