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. 
If whitespace is important, building the string like this could cause issues.  You might want to try a [heredoc](http://rubyquicktips.com/post/4438542511/heredoc-and-indent).  Just guessing...