Use TClass::GetClass(), strip spaces (ROOT-6847).

(cherry picked from commit 0ee64aa58606e25f54ac94251678840e5494b1da)
Remove now fatal delete-s (Thanks, Philippe!).

(cherry picked from commit a4e50fdcd67d9999ded3f8ba78577a1ccc55ac51)