Replaced standard allocator with nedmalloc.

Nedmalloc allows us to use memory pools which we can free afterwards.
Each thread (which could evaluate a query) now has its own memory pool.
Moved query code from clause.c to query.c Added query constructors.