General template functionality including a plugin to run htmlcode
FIX: use NodeBase::Cached
Merge branch 'master' into template
Added the NodetypeRegister which caches all nodetypes. This will be the
basis of requests to the database to get nodes.  Nodetypes govern how we
get a node from the database.  Or they will soon.
getAllTypes moved to NodeBase.pm from DB.pm because it returns nodes
and not some sort of db data structure

change Everything::DB and subclasses to using Moose. Remove dependency
on Super.

getNodeCursor - changed so that the third argument $TYPE is an id for
a nodetype. I.e. nodetype_id or node_id which with the current db
schema is the same thing.

Or at least I tried to change it.  My regression tests are stopping me
from doing this properly. At the moment DB.pm is tightly couplied with
the whole Node.pm hierarchy.

NodeBase.pm deals with nodes.  DB.pm deals with SQL and the database.

DB/Pg.pm modified the 'nodetype_data_by_id' method, because postgresql
croaks if you try to compare a string with an integer.

Test suite: had to change the tests. The DB.pm tests used too much
mocking. The API is a bit of a mess.  When we pass a nodetype, is it a
name, an node_id or a nodetype.pm object?  So much of the code of
DB.pm tries to deal with all these cases and we end up with
complication. The worst is that a nodetype 'title' might be numeric,
therefore it might look the same as a node_id.

The solution is to make the the APIs cleaner and put the onus on the
programmer to decide what arguments he wants to pass and make sure the
arguments correspond to the API.
Move of insert node into DB::Node tree
Test fixing after moving DB/Node hierarchy
Adding all files to DB/Node tree.
Cleanups in tests.
FIX: need to pass a nodetype to getNodeWhere so we can dispatch the select functions properly.
Remove use of sqlSelectJoined and