Add return value to LoadText(), Declare() (ROOT-5698).

(cherry picked from commit 901dc0b3b1b7ae0d958474f6517a4737c6729d48)