lcm on list of numbers; factorise(n)

The JME/Numbas.math function lcm now works on a list of numbers, returning the LCM of all of them.
This also adds a new function Numbas.maths.factorise(n), which returns a list [a_2,a_3,a_5,...], where n = 2^(a_2)*3*(a_3)*5^(a_5)*...
add jme function 'distinct'; fix lcm; document math.factorise
add jme 'pluralise' function

wraps Numbas.util.pluralise
allow new types to be added to treeToJME/texify

If you make a new JME data type, you can add code to turn it into TeX or JME by adding a function to Numbas.jme.display.typeToTeX or Numbas.jme.display.typeToJME. This replaces the old switch-statement method which couldn't be modified.

There's also now Numbas.util.equalityTests, which does the same thing but for checking two elements of the same type are equal.
fix jme function `factorise`

it wasn't returning wrapped numbers
treeToJME: fix opBrackets check

check that an op is defined in opbrackets before seeing if the arg needs brackets
don't try to work out gap marks at compile time

fixes numbas/editor#206
Merge branch 'master' of github.com:numbas/Numbas
document new functions
Merge branch 'master' into patternmatching

Conflicts:
	runtime/scripts/jme-display.js