Implement user-agent in HTMLDownloader

It was forgotten in the previous commit
Fix headers definition

Based on what's done inside urllib2.py.