The Complexity of Stable Matchings under Substitutable Preferences