How to view the raw C / AVR code generated by IDE before compliation?

For your sketch, the pre-processed C++ code will be in $TMP/sketchname.ino.cpp or $TMP/sketchname.cpp (depending on exactly which version of the IDE you are using, apparently.)
$TMP is some temporary directory with a weird name that Java picks for you; the easiest way to find it is to turn on the "verbose" compilation option in the preferences menu, do a "verify", and copy/paste.

Libraries are compile directly from their source code, which can be found in the distribution directory.

You're likely to be disappointed. There is actually very little pre-processing that goes on, and your sketch will look very much like the original. See also: Redirecting