sizeof patch

Here is my first attempt at a patch.
It introduces a new header file where
people can put templates to be used wherever.
I have put "endof" and "lengthof"
which replace most uses of sizeof.
This should make the code a little neater.

I have added Chris Lattner's modifications.
I hope that this patch is acceptible.

patch (19.9 KB)