Issue 12653 - Implement the getFunctionAttributes trait.

https://issues.dlang.org/show_bug.cgi?id=12653

The current `std.traits.functionAttributes` implementation is very complicated due to reliance on demangling to figure out the attributes of a function. Additionally it doesn't support `const/immutable/inout/shared`. 

Although support for these could be added in the library it's IMO time to move this whole functionality into the compiler as a trait. It's simpler this way and will speed up compilation.

The same could be done later for `ParameterStorageClassTuple` which uses demangling as well.