Short id generator. Port of https://github.com/dylang/shortid to Python