Also:
Did people ever try to improve flintlock pistol and muskets with sharper accuracy, longer ranges, amount of black powder put inside the guns or shorter reloading times? If so, when did it began?
I'm also very interested in double-barreled and multi-barreled flintlocks (such as the duckfoot pistol), how did people decide that it would be more "practical"? As in, being able to shoot consecutive couple or multiple shots before reloading again? Did people try these same techniques with flintlock rifles and muskets?
Regarding double-barreled and multi-barreled flintlock firearms. Did people try to improve cannon accuracy, ranges, amount of black powder put inside them and reloading times? ( such as mortars, broadsides, carronades?) What were the results? (bad, good?)
It seems like a pain in the ass to reload a gun between 30 seconds up to even a minute! Would reloading times have been improved in double-barreled and multiple barreled flintlocks as well?
Last but not least, when did flintlocks actually began to be replaced with guns such as revolvers and ones like "civil-war era" rifles and pistols? What were the first countries to adopt self-repeating guns into their militaries and navies?
The first major improvement to the flintlock musket was the percussion musket, which began to appear in military arsenals in the 1830s. The discovery of fulminates in the early 1800s made possible the creation of the percussion cap. When placed on a nipple and struck by a hammer, the percussion cap detonated and sent a tiny jet of flame down through the touch hole to the powder charge. This was a significant improvement over the flintlock, as it was both more reliable, especially in foul weather, and simpler in operation; rather than needing a sharp flint, a properly hardened frizzen, and powder sprinkled in the pan, one could simply place a cap and be done.
However, aside from these benefits, percussion muskets and rifles were no more intrinsically accurate, quick to reload, or long ranged than their flintlock predecessors. Certain developments - namely, the conical bullet, first introduced in 1849 by the French Army - enabled rifled muskets to be loaded more rapidly than before, as the bullet no longer had to be wrapped with a cloth or leather patch and stuffed down the barrel to achieve a tight gas seal, and to have at least somewhat better long range performance. This inclined most European militaries, as well as the United States, to begin transitioning from smoothbore percussion muskets to percussion rifle-muskets.
Meanwhile, in 1836 Samuel Colt introduced the first percussion revolver. Like the percussion musket, the revolver used paper cartridges and percussion caps placed on nipples; unlike the musket, the revolving cylinder could be loaded relatively quickly. The revolver proved much more suitable as a handgun used for personal defense than as long arms for military or hunting purposes. Some revolving rifles were used during the American Civil War, but they proved to be underpowered and prone to malfunction (when one chamber of the cylinder was touched off, the fire might spread to the others and cause a catastrophic explosion) and were quickly relegated to the dustbin of military history.
By the mid to late 1850s, viable breech-loading rifles such as the Sharps and the Burnsides were in existence. These were single-shot rifles that were loaded from the rear of the gun, rather than from the muzzle as with a musket. The Sharps used a paper cartridge, similar to those used in muskets and rifle-muskets, while the Burnside used a copper-cased cartridge. Both saw limited service in the Civil War, especially with Union cavalry units, but the rifle-musket ruled the infantry battlefield.
In 1860, the first really viable repeaters appeared. These were the Henry and the Spencer. Unlike earlier breachloaders, the Spencer and Henry could be loaded with multiple metallic cartridges, and upon operation of a lever, the fired cartridge would be thrown out and a new one seated in its place. The Spencer saw extensive use with Union cavalry, while the Henry saw limited use as a private purchase weapon. More importantly, the Henry would go on to directly inspire the famous Winchester repeating rifles.
To address your more specific points: of course people tried to improve muskets and cannon! And they were very largely successful. A flintlock musket from ~1750 was a far superior weapon to a crude arquebus from ~1500, just as a cannon from ~1850 was the clear master of a demi-culverin from ~1550. Metallurgy, machining, and chemistry were the real limiting factors in further improvement. While an early repeater could fire much faster than a rifle-musket, it was not noticeably superior to it in accuracy or power. Both were limited by crude, slow-burning black powder, and by the weakness of the metal. Superior steel and the development of fast-burning smokeless powder were necessary for the next evolutionary improvement to occur.
I can't speak to multi-barreled muskets, other than to say they were never in serious use by any military that I am aware of, double-barreled shotguns excepted. Additional barrels added weight, made firearms awkward to handle, and made them slower to reload, not faster. If a skilled musketeer could reload his flintlock in 15 seconds, each additional barrel is going to add at least another 12 seconds, assuming they share a common lock.
Did people ever try to improve flintlock pistol and muskets with sharper accuracy, longer ranges, amount of black powder put inside the guns or shorter reloading times? If so, when did it began?
The flintlock is the firing mechanism, which doesn't have much bearing on accuracy, range, and the barrel's ability to withstand larger loads of black powder.
Instead improving accuracy, range, and powder capacity was largely a matter of improving the barrel. This resulted in "rifled" muskets, such as the British Baker Rifle, which first came into common use during the Napoleonic Wars.
They were much more difficult to reload however - the bullets barely fit into the barrel - hence their use was often limited to sharpshooter units (or equivalents). The French Army notably largely refrained from using them.
I'm also very interested in double-barreled and multi-barreled flintlocks (such as the duckfoot pistol), how did people decide that it would be more "practical"? As in, being able to shoot consecutive couple or multiple shots before reloading again? Did people try these same techniques with flintlock rifles and muskets?
It was never deemed very practical as a combat weapon due to weight. Why carry a musket twice as heavy when reload time was not affected? Double-barreled flintlocks were therefore limited primarily for hunting weapons (where an immediate second shot might make up for a missed first shot), or for close-quarter weapons where there won't be much reloading happening regardless.
Did people try to improve cannon accuracy, ranges, amount of black powder put inside them and reloading times? ( such as mortars, broadsides, carronades?) What were the results? (bad, good?)
Yes by the Napoleonic Wars the 12 pounder was the standard piece, which was considerably larger than the cannons at the start of the flintlock era. Field mortars were also first deployed in significant numbers by the Prussian Army under Fredrick the Great, which eventually evolved into howitzers used by some of the armies in the Napoleonic Wars.
It seems like a pain in the ass to reload a gun between 30 seconds up to even a minute! Would reloading times have been improved in double-barreled and multiple barreled flintlocks as well?
Nope. Reloading two barrels requires twice the time to reload a single barrel. The main use of twin barrels is to have a second shot ready in case the first shot misses and reload time is not a major factor - hence its use primarily in hunting weapons and for close quarter combat.
The long reload time also meant that muskets were primarily formation weapons - you need to have disciplined formations of troops reloading, aiming, and firing together. A well-trained soldier in the Napoleonic Wars could in fact fire much more rapidly than once every 30 seconds - five shots a minute (1 per 12 seconds) being an oft-quoted standard.
The 30 second reload time applies more to the US Civil War, where everyone was using rifled muskets (which were more difficult to reload) and troops tended to be citizen-soldiers.
Last but not least, when did flintlocks actually began to be replaced with guns such as revolvers and ones like "civil-war era" rifles and pistols? What were the first countries to adopt self-repeating guns into their militaries and navies?
As Rittermeister noted they were replaced primarily by the percussion musket, which completely replaced the flintlock firing mechanism.
Muzzle-loaded muskets continued to be used by major armies for the rest of the 19th Century, albeit their last major deployment was during the US Civil War when most muzzle-loaded muskets had rifled barrels and percussion firing mechanisms. Repeating revolvers and carbines were also available at this point but were not widely distributed (likely due to cost).
They were replaced by breech-loaded "needle guns" in Europe a short while later, and these weapons were the primary firearm of both the French and German armies in the Franco-Prussian War of 1870. These weapons are often considered to be the first true "rifles", as opposed to being "muskets" or "rifled muskets".
Edit: Clarification