Passive wing deployment and retraction in beetles and flapping microrobots