Representations of almost periodic pseudodifferential operators and applications in spectral theory