Checks out the node with the possibility to allow other sessions to check it in.
This is a workaround for the current WYSIWYG editor infrastructure, which can't
use the same session for opening and saving a node.
Parameters: restrictedToSession - if the check-out is restricted to the current session. throws: RepositoryException - if an error occurs.
Checks if the node is checked out by a certain session. We pass the session
as a parameter to allow the check for nodes from the shared item store.
Parameters: session - The session. if the node is checked out by a specific session. throws: RepositoryException - if an error occurs.