added docs for on_add_node and on_remove_node in custom plugins

Based on what I learnt from #436 I've extended the docs.