The maximal operator in weighted variable Lebesgue spaces on metric spaces