Added PDFGenerator available check to download PDF button.

- Added PDFGenerator available check to download PDF button before running show/hide or enable/disable commands on it. This was causing JS error running actions when button is not in toolbars.
- Refactored code that was running JS commands on toolbar buttons to show/hide or enable/disable them.

@dclarizio please review/test. This fix should load timelines successfully when PDF button is hidden in the toolbars. 
No need to wrap button_id and typ in `#{}`, since they are already strings.