Add fk's and 404s

Add board / thread foreign key

Use board id for threads

Added 404's for some queries

Signed-off-by: Spencer Deinum <spencerdeinum@gmail.com>