On the Structure of Linearly Compact Rings and Their Dualities