Fix error in use of counter mode.

Changes the AES-256 CTR implementation to use a randomly generated IV
for each method. Previously, the same IV was used for all messages until
manually changed by the user. Accordingly, multiple messages were
encrypted with a keystream using the same IV. This is a basic error in
stream cipher implementations, as it allows for the keystream to be
subtracted out of the ciphertext if multiple messages are intercepted.

Consider two messages, M1 and M2, which have been encrypted using the
same IV for the counter. That is, both messages are encrypted using the
same keystream K. For a single block of plaintext, the ciphertext is
produced by XORing the plaintext with the output of a single block of
AES-256, with the input being the nonce (IV) and counter encrypted with
some secret key. Thus, the first block yields:
	C1 = M1 ^ K
	C2 = M2 ^ K
Then,
	C1 ^ C2 = (M1 ^ K) ^ (M2 ^ K) = M1 ^ M2
which can be trivially cryptanalyzed to yield M1 and M2. This shows the
importance of using a unique IV/nonce when using a block cipher in CTR
mode.

One of the goals of xchat-crypto was to allow multiple users to
communicate using AES in real-time. This led to the decision to use the
same IV for messages and leave changing the IV up to the user(s),
resulting in the security hole described in depth above. The "packet"
format of the encrypted message now includes an IV randomly generated
using a Cryptographic Random Number Generator provided by PyCrypto. The
packet format is now [aes]iv$ciphertext[/aes], easily allowing for a
random IV for each method while avoiding the need for counters to remain
synchronized. Note that the IV does not need to be kept secret, only the
key.
Refactor code.

Refactor the code base according to pylint. Module name is changed from
xchat-crypto.py to xchat_crypto.py to follow standard Python
conventions.
Add support for HMAC-SHA256.

Adds functionality to send a hash-based message authentication code
(HMAC) along with the ciphertext. The USE_HMAC flag governs the use of
HMACs; if true an HMAC will be calculated and appended to the message
packet as follows:
	[aes]nonce$ciphertext$hmac[/aes]

An incoming HMAC will be checked for authenticity regardless of the
value of USE_HMAC. A warning message is printed in bold red if
validation fails.
Add support for multipart messages.

Adds code to support multipart messages; that is, messages where the
message length is longer than the allowed IRC message length.