Add profiles to categories option when a customer profile is included

https://bugzilla.redhat.com/show_bug.cgi?id=1114063

The data have been collected. But without keyword profiles in the categories option, the data are not sent for storage.
This is a refactoring of existing code. Most lines I did copy and paste. Same to some comments below. But I'll revise them as suggested