Disorder-enhanced phase coherence in trapped bosons on optical lattices