Chatham Lodging to buy Pittsburgh hotel for $40M