Add a getPlugin helper function

This makes it easier to retrieve plugins based on their name or
class.