I've thought a bit about this, but haven't had a chance to try it out yet. In case it helps others, here are some thoughts that might get someone going in the right direction.
The first step is how to bring the code into GAS. Here is an older blog post from a Google DevRel on how to include Underscore on the container side. The basic idea is copy/pasting the JS library into a GAS library. Then referencing that GAS library in your container bound script.
http://googleappsdeveloper.blogspot.com/2012/11/using-open-source-libraries-in-apps.html
Underscore is a much smaller library of course and doesn't have the same dependencies that jQuery does. Happily jQuery 2 was updated to work without a browser on the server side for at least Node. Here are the steps for using it with Node. Note in Node it depends on htmlparser and jsdom. In GAS we have XmlService, which I don't think we can count on having the same JS structure as jsdom objects. You may have to bring in jsdom as well (along with its dependencies), or maybe write a jsdom wrapper over XMLService.
http://www.hacksparrow.com/jquery-with-node-js.html
Assuming step 2 can be made to work, there may still be jQuery dependency issues. You probably don't want/need all of jQuery. To reduce dependencies you could look at building your own trimmed down version. Here are some instructions for doing that. You could remove ajax for example with grunt custom:-ajax
.
https://www.npmjs.com/package/jquery
Hope that helps or at least makes it clear why this is hard :).