Ported refs and annotations to new plugin API

Also deleted htmlifier and indexer since this is the last feature missing...