Fabrication of titania inverse opals by multi-cycle dip-infiltration for optical sensing