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. 
Instead of accessing button[0] and not making the code clear, there are two ways to handle this...

```ruby
center_tb_buttons.each do |button_id, _button_value|
  page << "center_tb.showItem('#{button_id}');"
end
```

or

```ruby
center_tb_buttons.keys.each do |button_id|
  page << "center_tb.showItem('#{button_id}');"
end
```