PHOENIX-1364 Fix resource leaks in various classes (Ted Yu)
PHOENIX-1370 Allow query timeout to differ from RPC timeout