Filter to Optionally Disable Theme Fragments

Hi, I suggested this filter in #2493, and so I put together a pull request to give you an idea of what I was thinking. It would be nice to save an the extra AJAX request if we aren't using theme fragments. Thanks.