DECIDABILITY OF SECOND-ORDER THEORIES AND AUTOMATA ON INFINITE TREES