improve assertions message on function pointer errors
mention ASSERTIONS in abort() calls
extra testing for ASSERTIONS == 2
add test for #2175