Make CoundaryCondition a type-erasure base class and implement DirichletBC and PeriodicBC on top of this