Register Allocator: refactoring and add comments.

No functionality change. Thanks Andy for reviewing.

rdar://16162005