A historic family brewery has bought a 17th century coaching inn in the Cotswolds which is next door to a pub it has owned for nearly 30 years.