A historic Tribeca building that at one time was home to a Montessori school and then a WeWork location has traded hands for a little over $34 million, records show.