Refactored stairs rendering to support corners

I've tested this quite a bit, and it seems to be working just like it does in the game. It also works at different render rotations. It's a bit complicated so I added a lot of comments.