Enable/Disable tabs at appropriate times

This is the beginning implementation of PatApp::setAppState.  Detail
needs to be filled in for the case when a tab is enabled, but perhaps certain
controls need to be disabled.