Add an `InvalidNodeType` constructor to the `NodeError` type

This aims to deal with cases where the `typename` field of the `nodes` table
does not correspond to a valid node type.
The new constructor has an Integer field to indicate what the stored
invalid type name ID was.
The related machinery was updated accordingly.
4 jobs for 396-add-a-node-type-name-error in 56 minutes and 54 seconds (queued for 3 seconds)
latest
Status Job ID Name Coverage
  Cabal
passed #14746
cabal

00:22:57

 
  Stack
passed #14747
stack

00:03:45

 
  Bench
manual #14748
allowed to fail manual
bench
 
  Test
passed #14749
test

00:30:11