sql: Drop use of trashbox and setjmp

Add new token type to identify EOF and use it to break out of loops, properly
cleaning all local memory allocations until parser terminates.