Prevent some initialization order problems

- Make TableQuery.shaped and TableQuery.toNode lazy to prevent them
  from being initialized unnecessarily early, thus avoiding infinite
  recursion loops during initialization.

- Check for null TypedType values in Table.column and
  MappedColumnType.base, failing early with a NPE with a useful error
  message.

Tests in RelationalMiscTest.testInitErrors. Fixes #730.

Review by @cvogt