Ordered mesoporous and macroporous inorganic films and membranes