Refactor attributes system.

By introducing abstractions for attribute builder and set since they differ
greatly between LLVM 3.1-3.3.