Is there a tool/approach to automatically generate an app on an iOS or Android device from HTML5 or jQuery Mobile code so that the app loads/runs entirely on the mobile device i
Yes - Trigger.io apps bundle all your HTML/CSS/JS into a natively packaged app - there's no internet access required for it to work.
Of course, if your app will only fully function if it has access to remote services, then the experience will degrade, but you can handle that with forge.is.connection.connected.