Added a compiled username regex similar to slugify

Added a compiled username regex `_username_re` to `main/util.py` used in `util.is_valid_username()`; similar to those used in `util.slugify()`; perhaps the pre-compiling of the regex makes a slight difference, but this is mainly suggested to improve code readability (note: no change in the actual regex used).