On property (T) for pairs of topological groups