677 add version number to xform and endpoint to replace a form

closes #677 and #542 
@denniswambua Why another query to the database when you already have the object in survey?