[tests] Don't check files in contrib/

It makes no sense to test those files with pytest.
[web] Security: verify HTTPS connections

Willie now verifies HTTPS connections when calling HTTPS-enabled web APIs.
It will use ca_certs from the config file,
and fallback to /etc/pki/tls/certs/ca-bundle.crt if ca_certs is missing from
config.

Verification of hostnames is done using backports.ssl_match_hostname.
This package is now mandatory to use willie.web, and is the most secure
and forward-compatible way (it's not needed in Python 3) to do hostname
validation.

Module authors specify verify_ssl = False in all web.py helper functions,
if they wish to disable https verification functionality.

Also change youtube.py to use gdata API over https, for easier testing
of this functionality.

Fixes #456
[web] Fix two silly bugs caused by last commit
[core]Fix windows exception reporting (close #457)
[core] Add bot.notice() and a notice parameter to bot.reply()

This allows modules to repond with NOTICE to certain commands.
bot.reply() accept a boolean parameter named notice, if it is set to true
the reply will be sent as a NOTICE to the originating channel instead of a
PRIVMSG.

This fixes issue #339
[config] Fix incorrect comparison in yes/no options

Fixes #459
[config] Minor tweak for better readability
[core] Security: proper validation of IRC server certificatee

I noticed this issue few weeks ago when I was writing elad661/ssl_cert_info.
Basically, the way I originally implemented certificate verification was shit.

It was shit because of few major reasons:
 1) It did not verify wildcard according to the RFC, and it ignored DNS fields
in the certificate
 2) It opened a connection to fetch and verify the cert CN, and only then
it opened the actual connection. A clever MITM attack could have bypassed
this easily, if it got the timing right.
 3) It was slow.

Due to the recently introduced dependecy on backports.ssl_match_hostname,
fixing this was easy.

This commit also removed the useless code we had in place to do the handshake
manually, and let Python do the work for us. This simplifies SSL handling code
in the core.

I also removed verify_ssl_cn() from tools, I hope nobody was using it because
that implementation was extremely wrong.
[core] Migrate from optparse to argparse

optparse is deprecated since Python 2.7. This commit migrates the code to
the newer module, argparse, which also simplifies our code a bit.

Fixes #445
[core] use from __future__ import print_function

This will make life easier when we port to Python 3.
[core] Remove debug print

This debug print got here in commit f770df5c0c, and should never have been
pushed. Sorry about that.
[core] Fix Exception syntax to be forward-compatible
[core] More forward compatability

Absolute imports, print function, excetion syntax, string objects...

With this commit (and changing every instance of iteritems and itervalues
to items and values respectively), I was able to run willie on Python 3!

The iteritems and itervalues change did not make this into this commit simply
because I'm not sure if I should implement our own wrapper function in
willie.tools or use python-six for it
[core, modules] Python 3 support!

Issue #236

I'm happy to announce that with this commit, all basic Willie functionality
can be ran on Python 3!

There are few bugs remaining to iron out and few modules which fail to load
and need to be fixed, but all the basic functionality now works well with
Python3.

No extra dependencies introduced, Python 2.7 is obviously still supported.
[url] Nitpick: It's named hostname, not TLD

TLD is .com, .co.uk, .org and such. It stands for Top Level Domain.
What url.py referred to as TLD is actually named hostname.

This has been bothering me for quite a while now, so I just went ahead and
fixed it.
[web] when return_headers=True in web.get(), return final url as well.

Final url in this context means the URL after redirections. This is useful
for when/if we want to change url.py to open only one connection per URL
instead of two.
Revert "[web] when return_headers=True in web.get(), return final url as well."

This reverts commit fb592c83ec09610b36f5bc339c54897605125b47.

Now is not the time for this change
[web,modules,setup] More python 3 compatibility

Most modules should now work with Python 3.
Work is in progress to get the rest of them fixed.
[web] Fix typo in docstring
[url] Add forgotten encoding tag

Without this tag, Python2 will refuse to load the file. Oops.