Ticket #5786: Properly handle cv-qualified member pointers as template p...

...arameter.