Orphan a tasks when closing a project with open tasks (updated)

Some functions moved to model file and renamed to be less wordy.

Old notes:
-- Update fixes an issue where screen doesn't refresh after closing the project leaving the previously associated tasks still showing as if the close state had not happened.
-- When closing a Project with open opportunities (open,assigned), a warning is displayed that says if you close the project the opportunities will be orphaned. 
-- Orphaning an opportunities simply removes the projectId from the task table, the state is left unchanged.

Addresses #351 & #359

Replaces #433