add code:get_mode() to detect how the code server behaves

Some applications (like IDEs) have code to be loaded dynamically on a
node. It may be slow to load everything upfront every time, so if the
node is in interactive mode, we would like to just append to the load
path. This provides a way to detect if the node is running
in embedded mode or not.