Theory of photoelectric complex formation titrations using metal indicators