Newly filed internal documents show how Google viewed its work with schools as a way of turning children into lifelong customers — while the company simultaneously acknowledged research suggesting that YouTube, one of Google’s main platforms, can be unsafe and distracting.