Subway intends to close 500 of its stores in an effort to improve business as it faces increased competition.