A Bioinspired Swimming and Walking Hydrogel Driven by Light‐Controlled Local Density