Refactoring +class_attribute+ to make it more readable.

For performance benchmark see https://gist.github.com/wangjohn/6055413.
The benchmark was run on both the non-refactored and the refactored
code and compared. The results are as follows:

  Non-refactored version:
                                  user     system      total        real
  Defining attribute         36.220000   0.060000  36.280000 ( 36.325351)
  Accessing attribute        24.360000   0.000000  24.360000 ( 24.391732)
  Accessing attribute (Subclass) 25.200000   0.000000  25.200000 ( 25.216491)

  Refactored version:
                                  user     system      total        real
  Defining attribute         35.030000   0.000000  35.030000 ( 35.066825)
  Accessing attribute        23.750000   0.010000  23.760000 ( 23.770968)
  Accessing attribute (Subclass) 26.550000   0.000000  26.550000 ( 26.588491)

The performance cost of the refactoring is relatively small (pretty much
negligible).