tools: always append "exit" in frr-reload.py
When reloading the following config:
```
router ospf6
area 0 range 2001:db8::/32 advertise
exit
!
interface eth0
ipv6 ospf6 area 0
exit
```
frr-reload.py doesn't execute "exit" commands. Because of that, it tries
to execute "interface eth0" inside the "router ospf6" context and fails.
To always execute all commands from the correct context, frr-reload.py
should properly exit from every entered node.
Fixes #10132.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit
792ada473893b2d16e0eccde974b71ddc65d15eb)