First of all, your statement, that it's not allowed to bring any liquid (gels, spray cans, ...) with you on most airports is simply not true.
In the EU, any liquid must be in containers of not more volume than 100ml, and all containers must be in a transparent, close-able plastic bag of not more than 1000ml.
In the US, the rule is the same, but the limits are a bit lower for smoother numbers, like 3 fluid ounces (~90ml) and 30 fluid ounces (~900ml). (I'm not absolutely sure about this values...)
The reason behind this is... not very clear. There is a big anti-terrorism stamp on this rule, but if you question the rule, there is no reasonable answer. You can bring enough toxic substance in that bag to kill everyone on board, or even explosives to put the aircraft down.
If you ask me, the entire rule is there because the authorities wanted to make a rule to demonstrate that they are taking action. Remember that liquid baby food and personal medicine is excluded from the rule. Do you think terrorists would not abuse these exceptions? I still think this was the biggest coup ever of cosmetics and plastic bag sellers... (The latter could advertise explosion-proof bags... )
Sorry, I went a bit off-topic.
In general, it's easy to check carry-on luggage for liquids, as they (or their cans) are clearly visible on X-rays.
Explosive or oxidative material like your nitrate- or peroxide compounds are also in general banned from aircraft, from carry-on as well as from checked baggage.
However, they are hard to see on X-rays, especially if you put them into a less obvious shape. Manual inspection of your luggage would be the only way to search for these substances. In case of doubt, the staff at the safety check can do a wipe test, which means they wipe a small, special card over your carry-on (also from inside, and may be, they also check you). The card is then inserted into an analysis device, which can identify traces of forbidden substances, like explosives and drugs.
Here is a picture of a wipe test, with the analyzer in the background:
Demonstration of wipe test. Source: http://noe.orf.at
I remember flying from Zürich with a bag full of electronics. (Laptop, Laptop charger, mouse, another mouse, headphones, camera, camera charger, camera-to-laptop-cable, custom PCB, ...) and they did a very, very, really very careful wipe test.