legislative = that which is of or pertaining to a legislature. By stating "legislative powers" - the object of the article itself - and noting them to be "herein granted" - as in within Article I - the Constitution indicates that the powers found in Article I are legislative (that is they are of or pertaining to a legislature). Those powers, notes the constitution, are vested in a Congress. Since the habeas corpus clause is in Article I it must by necessity belong to Congress. Doubt me? Then provide the statement of a founding father or other authority present at the adoption of the Constitution who ever said so much as a single word otherwise.
and your interpretation doesn't account for the extended periods when Congress is not in session.
Sure it does. That's why there is this clause from Article II pertaining to a president's powers:
"[H]e may, on extraordinary Occasions, convene both Houses, or either of them, and in Case of Disagreement between them, with Respect to the Time of Adjournment, he may adjourn them to such Time as he shall think proper"
Surely something like a war or other emergency would constitute an "extraordinary occasion," thus the Constitution is clear on its intent for the president to convene congress in times such as those you mentioned.