Reduce duplicate Attach() calls in bdev
Reduce duplicate Attach() calls in bdev

Currently, the 'public' functions of bdev (FindDevice and
AttachOrAssemble) will call the Attach() method right after class
instantiation.

But the constructor itself calls this function, and therefore we have
duplicate Attach() calls (which are not cheap at all).

The patch introduces a new 'attached' instance attribute that tells if
the last Attach() was successful. The public functions reuse this so
that we only do the minimum required number of calls.

Reviewed-by: imsnah

apyrgio/snf-ganeti,apyrgio/snf-ganeti,yiannist/ganeti,apyrgio/ganeti,mbakke/ganeti,yiannist/ganeti,apyrgio/ganeti,leshchevds/ganeti,andir/ganeti,andir/ganeti,leshchevds/ganeti,grnet/snf-ganeti,mbakke/ganeti,onponomarev/ganeti,grnet/snf-ganeti,leshchevds/ganeti,andir/ganeti,ganeti-github-testing/ganeti-test-1,ganeti/ganeti,onponomarev/ganeti,dimara/ganeti,yiannist/ganeti,ganeti/ganeti,bitemyapp/ganeti,bitemyapp/ganeti,dimara/ganeti,mbakke/ganeti,ganeti/ganeti,ganeti-github-testing/ganeti-test-1