added partial specializations of category_of and mode_of for reference wrappers; allows ref(c) to be treated as a filter or device if c is a filter or device