General Considerations of the Electrostatic Boundary Conditions in Oxide Heterostructures