I address all cover letters, letters of rec, etc. "Dear Committee Members:" Don't waste your time addressing it to an individual. The only thing you can achieve by doing that is embarrassing yourself and giving the search committee the chance to have a good laugh at your expense. If you do it correctly, it doesn't actually achieve anything; why give yourself one more thing to stress about?
The advertisement usually specifies to whom the application should be sent. In such cases, use the name that's listed in the advertisement. If no name is given, then I would vote for the first option, as it is the most inclusive.
you should adress your Cover letter to future Principal investigator (PI) of the project:
Start off right. Address your potential future PI properly, as “Dr. (insert surname here).” If you begin your letter with “Dear Sir/Madam” or “To Whom It May Concern,” your application could be dismissed as generic and untailored for the position. A letter that appears to come off an assembly line is likely to ride directly into the trash bin. If you do not invest the time to learn about the PI and his or her research, then the PI is not likely to invest the time to read your application.