Code style refactoring, fixing some minor bugs and improving security

 - ensure xlivevalidation class is properly set
 - reduce generated inline JS code
 - ensure macro works independently
 - ensure better escaping of provided values for security
Add a new livevalidationConfirmation macro