Refactor ssh actions used for node erasing

Patch fixes few issues with erasing drives while
stopping deployment during provisioning, e.g.:
 * executing dd with non-existing under
   debootstrap shell option 'flag';
 * broken check of block device major code;
 * incorrect order of arguments, which are passed
   to erase_data function;
Also it implements more robust mechanizm to detect
provisining or provisined node.

Change-Id: Ic6022cc4ecb405a17dbeefb095590532cbbbe33b
Related-bug: #1316583
Merge "Refactor ssh actions used for node erasing"