Detect stability attributes on methods.

If it's a trait method, this checks the stability attribute of the
method inside the trait definition. Otherwise, it checks the method
implementation itself.

I'm a little unsure if it's fully working. I'll comment on the parts I'm unsure about; for now, I would like someone to spot any part I may have missed.