Compaction of nanodiamonds produced under detonation conditions and properties of composite and polycrystalline materials made on their basis