Import the whole thing; tidy up everything

... but especially the interface. I decided to remove the *_load_alloc()
functions but to put their semantics in the ordinary *_load() functions for
the sake of future compatibility with the 'opt' branch.

Some bugfixes, etc.

def_pal got transparency in index 4. The palette file format changed.

I seem to have even optimised the code. The laytest looks more smooth (or
it is that I sit here and code for more than 10 hours straight).

Suffice it to say that I rewrote the whole thing.

Headers are now installed, too.

This repository was imported from the herakles project's to mine as there
doesn't seem to be a need for a separate repo... The former github account
will vanish soon. I erased all past history because the commit message
scheme was unpleasant.