Structure and unitary cocycle representations of loop groups and the group of diffeomorphisms of the circle