udpapi: Register types with encoding/gob
httpapi: Better support for Resources
udpapi: Avoid out-of-bounds access on malformed packets

Also reports the strconv.ParseInt error if it's not possible to decode
the reply's code.
udpapi: Handle encryption correctly

Previously, the very first packet to be received after the ENCRYPT call
was not properly decrypted; the getPacket function was using the old
encryption state.
udpapi: Don't keep UDP API key in ecbState

Also add test to check if ECB is indeed correctly implemented.
udpapi: Return pointers to reply structs

Keeps the reply structs convertible to APIReply. Also change the gob
registrations to use the pointer types.
titles: Correctly load anime-titles.dat for testing
titles: LoadDB from an io.Reader instead of io.ReadCloser
titles: Fix compilation of search_test

Forgotten commit.
titles: Check if the anime-titles database was loaded correctly
anidb: Initial attempt at high level AniDB library