"It's" versus "its" frequencies
Solution 1:
I would say that It's is more frequent than Its.
It's = it is
Its = owned by it
Two completely different words, although with similar uses
I think it's generally more common to speak about things using It's when describing them than its as the sentence just feels more natural, for example
It's red vs Its colour is red
As for data to support this I'm not sure, however when I studied Natural Language Processing it is possible to use bigram / trigram equations etc to predict a word given the word / words before it. Probably something similar would work here.
Solution 2:
In common speech, they sound the same, so the question doesn't apply. For common writing like SE questions, I don't know, but for more formal writing covered by the Google Books Ngram corpus, its is around 8 times more common than it's (graph).
Re a heuristic, I believe one could have a set of rules that would cover a moderate percentage of cases with medium accuracy, but not with high enough accuracy to automatically correct, or probably even to flag for human review, incorrect usages. Deep grammatical parsing is needed to reliably evaluate the cases.
Solution 3:
No, there is no algorithmic determination possible. For example you might think that before an adjective, there should be it’s, but think of: “it’s possible to do this” and “I understand its possible consequences”.
Solution 4:
I have no idea. Given that "its" and "it's" have completely different meanings, I don't know what purpose such a comparison would serve.
its is the possessive case of "it", i.e. "belonging to it." it's is a contraction of "it is". It doesn't get much simpler than that.
The zebra picked up its suitcase and walked off. "It's a miracle," George said.
Edit: I misunderstood the "very simple program" part of the question, sorry. Unfortunately, very simple programs fare very poorly against English; it has borrowed from so many different languages that most simple heuristics will lead you wildly astray after a while.
Edit to match the question edit:-) Sorry, doing it properly needs a grammar check. See Microsoft Word for the utter howlers that result from trying to do grammar checks on the cheap!