Sei vicino, un semplice UNION ALL
dovresti fare quello che vuoi;
SELECT MAX(del_time), COUNT(*) cnt, MAX(subject) subject FROM (
SELECT to_delete del_time, thread_hash, subject
FROM messages
WHERE to_user_id = 27 AND `to_delete` >= SUBDATE(NOW(), INTERVAL 720 HOUR)
UNION ALL
SELECT from_delete del_time, thread_hash, subject
FROM messages
WHERE from_user_id = 27 AND `from_delete` >= SUBDATE(NOW(), INTERVAL 720 HOUR)
) a
GROUP BY thread_hash;
SQLfiddle modificato per i test .