Amalgamation of inverse semigroups and operator algebras