SAN FRANCISCO (Reuters) - A federal judge on Thursday refused to dismiss most of a lawsuit against Google Inc over allegations the company improperly scanned the content of customers' emails in order to place ads.