If a paper or software is released to the public, can the university still file a patent? It is my understanding that patents can be invalidated if there is prior art to the technique at hand; DJB has a piece that would suggest that this way authors can inadvertently invalidate their own patents, if not being careful with information disclosure.

http://cr.yp.to/patents/us/4200770.html


  Diffie disclosed the idea of public-key cryptography at a conference
  in June 1976. Diffie and Hellman also distributed preprints of their
  ``New Directions in Cryptography'' paper, which disclosed the
  Diffie-Hellman system, at that conference and by mail. For example,
  Mike Matyas received a copy in August 1976. The patent was filed in
  September 1977.
  
  Under United States case law, a document has been published if it
  ``has been disseminated or otherwise made available to the extent that
  persons interested and ordinarily skilled in the subject matter or
  art, exercising reasonable diligence, can locate it.'' A patent is
  automatically invalid if the patented invention was published more
  than a year before the patent's filing date.
  
  It appears, therefore, that the Diffie-Hellman-Merkle patent was
  invalid. In the subsequent court case MIT v. Fortia, another patent
  was invalidated for the same reason: the inventor handed out six
  copies of a preprint at a conference fourteen months before applying
  for the patent.


How does this work in the general case?  Is it important that in both examples a whole year has passed between the publishing and the patent application?

Is it necessary for a significant amount of time to pass between the publishing of a paper, and the patent application, for the patent to be subsequently declared invalid?

Specifically, if one's university explicitly claims that it has no interest in one's copyrighted work (whether books, articles or software), and no interest in any part of any revenue from such copyrights, but that patent revenue sharing and disclosure to the university of the patentable ideas is mandatory (IU), can one get around of any future claims for patents by simply releasing everything open-source and publishing all pre-prints before the university's patent office can get their hand on any of the research?
Yes, in most cases, dissemination of a patentable invention by academic publication (papers, talks, code) constitutes prior art and will result in a later patent application being rejected. That is why people and institutions who intend to patent their discoveries are very careful about what they publish, and when. (Basically, publish after the patent application is field.)

Regarding your patent evasion scheme, it would probably work in practice, but could lead to severe retaliation from your institution. You said yourself that the policy is to report all patentable inventions. By not doing so, and publishing without first enquiring whether your employer wants to patent the invention, you violate the policy... And, given your question, you would be doing so willingly and in bad faith. This sort of thing could get you fired. And, the could get the papers retracted (look at some of the examples of this on Retraction Watch).

Finally, on piece of advice: if you're so afraid that your employer owns the IP you create, enough to look for strategies to remove from them some of the IP they pay you to create, you should consider quitting. It doesn't look like you have a healthy relationship with your employer.