Planning with Critical Section Macros: Theory and Practice