Fix 'unorderable type' error in Python 3

When total is None there is an error in Python 3:

Traceback (most recent call last):
  ...
  File "tqdm.py", line 18, in format_meter
    if n > total:
TypeError: unorderable types: int() > NoneType()

This PR fixes this by first checking if total is valid.