What is the optimum separation between contra-rotating propellers?
Here is a paper that partially addresses your question; however, they discuss a ducted-propeller system.


  The effect of axial gaps showed that at the design speed combination best performance was observed at an axial gap of 50% of the 1st [fan's] chord.


A lot of research on contra-rotating props has been done for ships, it seems. This thesis indicates that, for ships,


  the effects of the spacing between the propellers is almost negligible with respect to the CRP efficiency.


This paper has an extensive review of rotor spacing for helicopters (it's also a good read for answering your second question). The author notes for one configuration that


  the effect of separation distance on the optimal performance of the system is not very noticeable for practical operation,


but for another that


  the separation distance significantly reduced the influence of the mutually induced velocities.


What all this tells me is that the optimum separation distance is likely highly dependent on the specifics of the propeller design and the aircraft's overall design. Various airflows from the aircraft structures (fuselage, wings, etc.) would affect the interference between propellors. The propellors' rotation speed, size, number of blades, and chord would all come into play. Furthermore, "optimum" could be a balance of any number of things, but most likely efficiency, thrust, and noise. Any commercial or military design would need to undergo extensive trade studies and CFD and wind-tunnel testing for the specific model, not rely on a general rule.