Database schema changes: splitting plot table into dataset and visible_p...

...lot tables + view plot

Refactoring of tools scripts
This isn't the right query - we need the id from plot for all the plots in visible plot. Same comment for below.