Some cleanup in bot core

Move core trigger checks into method
Fix login auth, intentional restart and double loading on reload
Ported Entitle plugin
Port EntitleRI (reverse image)
Add patch support