A self-driving laboratory for optimizing thin-film materials