Barack Obama bans spying on leaders of US allies, scales back NSA program