Foxx: use joi in queryParam and pathParam

This implements the changes in #936.