  The paper (as posted originally) contains several errors. It has been
subsequently split into two papers, the corrected (and accepted for
publication) versions appear in the archive as papers cs.CC/0503082 and
cs.DM/0503083.
