Same module for different Drupal versions
Sorry, you can't without hacking Drupal's core. By the documentation for Drupal 7 you need to set:

core = 7.x


in module's info file. At the same time documentation for Drupal 6 requires you to set:

core = 6.x


Values without [] may appear only once, so you cannot write:

core = 6.x
core = 7.x


And you cannot make a value to be an array, so following also would not be recognized and accepted:

core[] = 6.x
core[] = 7.x


Safest way to solve it is to keep modules separate, and move common PHP code to a PHP library. With Libraries API it should be pretty easy to do.