Implement faster is_a<>()

This implementation uses typeid() which is faster than dynamic_cast<>().
Merge pull request #26 from certik/typeid

Implement faster is_a<>()