Bosonic Szilard engine assisted by Feshbach resonances