Containers or packages provided with a flexible bag or a deformable membrane or diaphragm for expelling the contents