Preparation for bidirectional statusnet sync, functions moved from addons into the core and some converting stuff