Add CAS 3.0 attribute support, and style cleanups

@fmyzjs, here is a cleanup of an attribute mapper that does 2 and 3.  Would you mind trying it out with your protocol 3.0 server just to verify?  I took your code but switched it to using `in` instead of the `has_key` it had before.