Scottish Labour received a sexual harassment complaint about its Edinburgh council leader almost two years before he was suspended.