Hmm... I'm no expert on the media code so i'll leave that bit to jeanphi - certainly appears like it is simpler than the approach i'd suggest:
(it's based on the ray casting algorithm -
http://en.wikipedia.org/wiki/Point_in_polygon)
1) Make the assumption that all volumes are modeled, and form closed shapes - ignore small holes for now and assume there are no surfaces that aren't part of a volume.
2) For each triangle choose a direction (?tri normal) and extend to the bounding box in forward/backward direction.
3) Calculate ALL intersections along those rays
4) Take the first and last tris to require a normal pointing outwards (ie, in same direction as ray) - adjust as necessary and mark as checked.
5) Working towards the original tri adjust the normals so you get an out/in/out/in etc sequence.
6) If there is an error - ie, wrong number of intersections or you find a tri already marked which has an inconsistent normal - add both tris back to list to be checked (but try different ray this time)
7) Keep going until all tris are checked
In theory for a closed mesh this should work. Might take time though.... and could indeed be implemented as a python script in blender or somewhere external to luxrender - from memory there is an intersect method available in the blender python api.
Still, if you do it externally it would only need to be done once and then you could play with materials as required. Also to speed things up i'd consider removing duplicates initially and then selecting linked vertices into a list of surfaces rather than individual triangles - but not sure if your mesh configuration would allow this to work.