I hate to have to comment here, but firstly, if you look at the above example of the reaction mechanism for Marquis with dimethylbenzylamine you'll see there is no imine produced (at least involved with the formation of the coloured product). Same goes for the reaction with opiates (
see this link) Put simply, it is an acid catalyzed formation of a ring carbocation that results in the formation of the dimer which is coloured. mas49 has got it.
The above paper also contains other reaction examples.
Also, in over 3 years I spent researching reagents, several ~ 1L batches were stored in air tight schott bottles. Not once, even after several months, did I ever experience pressure release from opening a container, some of which were stored for over 9 months @ ~30 deg C. There may be some loss, but I'd argue it's pretty much insignificant. I think you'll find polymerisation of the formaldehyde accounts for at least some the discoloration. Formalin on it's on own polymerises when left on the shelf, producing a milky white solution. A few drops of added methanol fixes it.