Convert the CPP backend to use the AttributeSet instead of AttributeWithIndex.

Further removal of the introspective AttributeWithIndex thing. Also fix the #includes.