Idle/away hooks in perl

Allow perl modules to register hooks for going idle and :away.