The answer is a bit confusing, so I just spent a few hours updating the documentation of our datasets:
https://wikitech.wikimedia.org/wiki/Analytics/Data. The link for the pageviews dataset is now:
https://wikitech.wikimedia.org/wiki/Analytics/Data/Pageviews
To answer your question directly, .q is actually the project abbreviation for wikiquote. This is lightly inspired by the syntax for inter-wiki links, but it's explained in detail in this section:
The .m usually means access via the mobile site, unless .m.m appears in which case it could be something else, that's also described here in detail:
If you're still confused after reading that and trying it out, let us know.