Metadata fix in activity search
This fixes it such that even if the pseudofield (activity_type) has a 'type' the 'type'
from the 'real field' is used in the WHERE query. This mostly prevents a test fail per
https://github.com/civicrm/civicrm-core/pull/18147
if we improve the metadata. It's a bit of a non-fail fail - ie we are checking the where
clause has activity_type_id = 3 vs '3' and my testing has not shown a performance difference
but we don't want the test to be changed to the less good version