XPathHelper: added isExpressionNumeric()
MediaEmbed: moved some code around. No functional change intended