Multiwavelength study of the infrared dust bubble S51