M-Ideals in Banach Spaces and Banach Algebras