An Upper East Side townhouse with history aplenty — and where martinis are delivered always shaken, never stirred — is back on the market for $9.5 million.