Fix #1164 -- make filters.tidy py3k-compatible

This is #1164.

**Note:** tidy was broken because:

```pytb
Traceback (most recent call last):
  File "/home/kwpolska/virtualenvs/nikola-py2/lib/python2.7/site-packages/doit/action.py", line 360, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "/home/kwpolska/git/nikola/scripts/../nikola/utils.py", line 721, in unlessLink
    action(target)
  File "/home/kwpolska/git/nikola/scripts/../nikola/filters.py", line 167, in tidy
    assert False, (inplace, line)
AssertionError: (u'output/galleries/index.html', u'line 33 column 1 - Warning: discarding unexpected <nav>')
```

`discarding` is the key word here.  This basically means that you couldn’t use tidy with nikola if you use our default themes, otherwise you’ll break everything badly.

---

Right now, there are **still more quirks**.  You basically can’t use charts (because it hates <svg>, <defs> and some others).  Galleries and listings **lose the glyphicons for files and folders**.  There are also some other quirks.

But hey, that’s what you get for using 2009 tools in 2014.