Spanish police shoot man dead as he tries to attack officers with knife near Barcelona