Facebook long aware of harms its apps cause, new documents show