Positioning and power optimisation for UAV-assisted networks in the presence of eavesdroppers: a multi-armed bandit approach