Optimal-control methods for two new classes of smart obstacles in time-dependent acoustic scattering