Almost periodic pseudodifferential operators and Gevrey classes